﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/ManageMasterPage.master" AutoEventWireup="true" CodeFile="AssignOrd.aspx.cs" Inherits="Manage_AssignOrd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"  >
    <div style="background-color:#f3f9eb;padding-bottom:100px">
    <div style="margin:0 auto;text-align:center;width: 80%">

        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Ono" DataSourceID="SqlDataSource1" >
            <Columns>
                <asp:BoundField DataField="Ono" HeaderText="Ono" ReadOnly="True" SortExpression="Ono" />
                <asp:BoundField DataField="Oname" HeaderText="Oname" SortExpression="Oname" />
                <asp:BoundField DataField="Opayway" HeaderText="Opayway" SortExpression="Opayway" />
                <asp:CheckBoxField DataField="Opaystate" HeaderText="Opaystate" SortExpression="Opaystate" />
                <asp:BoundField DataField="Ophone" HeaderText="Ophone" SortExpression="Ophone" />
                <asp:BoundField DataField="Oadr" HeaderText="Oadr" SortExpression="Oadr" />
                <asp:BoundField DataField="Osumprice" HeaderText="Osumprice" SortExpression="Osumprice" />
                <asp:BoundField DataField="Ostate" HeaderText="Ostate" SortExpression="Ostate" />
            </Columns>
        </asp:GridView>
    </div>
    <div style="margin:0 auto;text-align:center;width: 80%">
        <asp:Label ID="Label1" runat="server" Text="选择送餐员"></asp:Label>
        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="Sname" DataValueField="Sname"></asp:DropDownList>
        <asp:Button ID="AssignBut" runat="server" Text="分派" style="margin-left:60px" OnClick="AssignBut_Click" />

        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=SUBAI-WORKSTATI;Initial Catalog=Restaurant;Persist Security Info=True;User ID=Manager;Password=321" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [Sname] FROM [Manager_Staff] WHERE ([Sdute] = @Sdute)">
            <SelectParameters>
                <asp:Parameter DefaultValue="送餐员" Name="Sdute" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=SUBAI-WORKSTATI;Initial Catalog=Restaurant;Persist Security Info=True;User ID=Manager;Password=321" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [Ono], [Oname], [Opayway], [Opaystate], [Ophone], [Oadr], [Osumprice], [Ostate] FROM [Manager_Order] WHERE ([Ono] = @Ono)">
        <SelectParameters>
            <asp:QueryStringParameter Name="Ono" QueryStringField="Ono" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
        </div>
</asp:Content>

